// Made with Blockbench 3.9.2
// Exported for Minecraft version 1.15 - 1.16 with MCP mappings
// Paste this class into your mod and generate all required imports

public class robot extends EntityModel<Entity> {
	private final ModelRenderer bone;
	private final ModelRenderer body;
	private final ModelRenderer head;
	private final ModelRenderer body_in;
	private final ModelRenderer cube_r1;
	private final ModelRenderer cube_r2;

	public robot() {
		textureWidth = 46;
		textureHeight = 34;

		bone = new ModelRenderer(this);
		bone.setRotationPoint(0.0F, 24.0F, 0.0F);
		bone.setTextureOffset(4, 4).addBox(-4.0F, -1.0F, -4.0F, 1.0F, 1.0F, 2.0F, 0.0F, false);
		bone.setTextureOffset(4, 1).addBox(-4.0F, -1.0F, 2.0F, 1.0F, 1.0F, 2.0F, 0.0F, false);
		bone.setTextureOffset(0, 0).addBox(3.0F, -1.0F, -4.0F, 1.0F, 1.0F, 2.0F, 0.0F, false);
		bone.setTextureOffset(0, 3).addBox(3.0F, -1.0F, 2.0F, 1.0F, 1.0F, 2.0F, 0.0F, false);
		bone.setTextureOffset(0, 0).addBox(-5.0F, -2.0F, -5.0F, 10.0F, 1.0F, 10.0F, 0.0F, false);
		bone.setTextureOffset(28, 11).addBox(-2.0F, -5.0F, -2.0F, 4.0F, 3.0F, 4.0F, 0.0F, false);

		body = new ModelRenderer(this);
		body.setRotationPoint(0.0F, 24.0F, 0.0F);

		head = new ModelRenderer(this);
		head.setRotationPoint(0.0F, 0.0F, 0.0F);
		body.addChild(head);
		head.setTextureOffset(0, 11).addBox(-3.0F, -15.0F, -3.0F, 6.0F, 5.0F, 6.0F, 0.0F, false);

		body_in = new ModelRenderer(this);
		body_in.setRotationPoint(0.0F, 0.0F, 0.0F);
		head.addChild(body_in);
		body_in.setTextureOffset(18, 24).addBox(-2.0F, -10.0F, -2.0F, 4.0F, 5.0F, 4.0F, 0.0F, false);

		cube_r1 = new ModelRenderer(this);
		cube_r1.setRotationPoint(-3.0F, -8.0F, 0.0F);
		body.addChild(cube_r1);
		setRotationAngle(cube_r1, 1.5708F, 0.0F, 0.0F);
		cube_r1.setTextureOffset(17, 15).addBox(-1.0F, -1.0F, -6.0F, 2.0F, 2.0F, 7.0F, 0.0F, false);

		cube_r2 = new ModelRenderer(this);
		cube_r2.setRotationPoint(3.0F, -8.0F, 0.0F);
		body.addChild(cube_r2);
		setRotationAngle(cube_r2, 1.5708F, 0.0F, 0.0F);
		cube_r2.setTextureOffset(0, 22).addBox(-1.0F, -1.0F, -6.0F, 2.0F, 2.0F, 7.0F, 0.0F, false);
	}

	@Override
	public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red,
			float green, float blue, float alpha) {
		bone.render(matrixStack, buffer, packedLight, packedOverlay);
		body.render(matrixStack, buffer, packedLight, packedOverlay);
	}

	public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
		modelRenderer.rotateAngleX = x;
		modelRenderer.rotateAngleY = y;
		modelRenderer.rotateAngleZ = z;
	}

	public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) {
		super.setRotationAngles(f, f1, f2, f3, f4, f5, e);
		this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
		this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
		this.cube_r1.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * f1;
		this.cube_r2.rotateAngleX = MathHelper.cos(f * 0.6662F) * f1;
	}
}